export const baseUsage = `
import {PhRadioGroup,PhRadioItem} from 'phoeon'
interface RadioGroup{
    disabled:{type:Boolean,default:false}, //禁止复选组
    value:{
        type:[String,Number,Array]
    }
}
interface RadioItem{
    disabled:{type:Boolean,default:false}, //禁止当前item
    value:{
        type:[String,Number]
    }
}
//测试数据
{
    sx:2,
    sxs:[{
        value:1,
        text:"康家沟小学"
    },{
        value:2,
        text:"张家界小学"
    },{
        value:3,
        text:"贵族小学"
    }],
}
`;
export const demo1 = `
    <label>读过的小学</label>
    <ph-radio-group :value="sx" @change="onSxChange">
        <ph-radio-item v-for="item in sxs" :value="item.value" :key="item.value">{{item.text}}</ph-radio-item>
    </ph-radio-group>
`;
export const demo2 = `
    <label>读过的小学(禁止全部选项)</label>
    <ph-radio-group :value="sx" @change="onSxChange" :disabled="true">
        <ph-radio-item v-for="item in sxs" :value="item.value" :key="item.value">{{item.text}}</ph-radio-item>
    </ph-radio-group>
`;
export const demo3 = `
    <label>度过的小学（禁止某一个）</label>
    <ph-radio-group :value="sx" @change="onSxChange">
        <ph-radio-item :disabled="item.value==2" v-for="item in sxs" :value="item.value" :key="item.value">{{item.text}}</ph-radio-item>
    </ph-radio-group>
`;
export const radio = `
import { defineComponent, reactive, toRefs } from 'vue'
import {
    PhField,
    PhRadioGroup,
    PhRadioItem,
    
} from 'phoeon'

export default defineComponent({
    components:{
        PhField,
        PhRadioGroup,
        PhRadioItem,
        
    },
    setup() {
      const formdata = reactive({
          sx:2,
          sxs:[{
              value:1,
              text:"康家沟小学"
          },{
              value:2,
              text:"张家界小学"
          },{
              value:3,
              text:"贵族小学"
          }],
      })  
      const onSxChange = (v:any)=>{
          formdata.sx = v
      }
      return {
          ...toRefs(formdata),
          onSxChange,
      }
    },
})
`;
